package com.ruoyi.ora.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ora.mapper.AssetsLikeMapper;
import com.ruoyi.ora.domain.AssetsLike;
import com.ruoyi.ora.service.IAssetsLikeService;

/**
 * 点赞Service业务层处理
 * 
 * @author liuwp
 * @date 2025-04-10
 */
@Service
public class AssetsLikeServiceImpl implements IAssetsLikeService 
{
    @Autowired
    private AssetsLikeMapper assetsLikeMapper;

    /**
     * 查询点赞
     * 
     * @param id 点赞主键
     * @return 点赞
     */
    @Override
    public AssetsLike selectAssetsLikeById(Long id)
    {
        return assetsLikeMapper.selectAssetsLikeById(id);
    }

    /**
     * 查询点赞列表
     * 
     * @param assetsLike 点赞
     * @return 点赞
     */
    @Override
    public List<AssetsLike> selectAssetsLikeList(AssetsLike assetsLike)
    {
        return assetsLikeMapper.selectAssetsLikeList(assetsLike);
    }

    /**
     * 根据业务主键查询一条记录：点赞
     *
     * @param assetsLike 点赞
     * @return 点赞
     */
    @Override
    public AssetsLike selectOneAssetsLike(AssetsLike assetsLike)
    {
        return assetsLikeMapper.selectOneAssetsLike(assetsLike);
    }

    /**
     * 新增点赞
     * 
     * @param assetsLike 点赞
     * @return 结果
     */
    @Override
    public int insertAssetsLike(AssetsLike assetsLike)
    {
        assetsLike.setCreateTime(DateUtils.getNowDate());
        return assetsLikeMapper.insertAssetsLike(assetsLike);
    }

    /**
     * 修改点赞
     * 
     * @param assetsLike 点赞
     * @return 结果
     */
    @Override
    public int updateAssetsLike(AssetsLike assetsLike)
    {
        return assetsLikeMapper.updateAssetsLike(assetsLike);
    }

    @Override
    public int updateAssetsLikeCondition(AssetsLike assetsLike, AssetsLike assetsLikeCondition)
    {
        return assetsLikeMapper.updateAssetsLikeCondition(assetsLike, assetsLikeCondition);
    }

    /**
     * 批量删除点赞
     * 
     * @param ids 需要删除的点赞主键
     * @return 结果
     */
    @Override
    public int deleteAssetsLikeByIds(Long[] ids)
    {
        return assetsLikeMapper.deleteAssetsLikeByIds(ids);
    }

    /**
     * 删除点赞信息
     * 
     * @param id 点赞主键
     * @return 结果
     */
    @Override
    public int deleteAssetsLikeById(Long id)
    {
        return assetsLikeMapper.deleteAssetsLikeById(id);
    }

    /**
     * 条件删除点赞
     *
     * @param assetsLike 点赞
     * @return 结果
     */
    @Override
    public int deleteAssetsLikeByCondition(AssetsLike assetsLike)
    {
        return assetsLikeMapper.deleteAssetsLikeByCondition(assetsLike);
    }

}
